export class NumberUtils {
  static readableText(number?: number): string {
    let result;
    if (number === undefined || number === null) return "";
    if (number >= 1e8) {
      result = `${(number / 1e8).toFixed(2)}亿`; // 亿
    } else if (number >= 1e4) {
      result = `${(number / 1e4).toFixed(2)}万`; // 万
    } else {
      result = number.toFixed(2); // 保留两位小数
    }

    return result;
  }
}
